package com.ydd.controller.user;

import com.ydd.entity.YddUser;
import com.ydd.entity.YddUserData;
import com.ydd.mapper.YddUserDataMapper;
import com.ydd.result.Result;
import com.ydd.service.UserService;
import com.ydd.vo.GetUserInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author itheima
 * @Date 2023-05-03 14:38
 */
@Api(tags = "登录成功回显数据")
@Slf4j
@RestController
@RequestMapping("/user")
public class GetUserInfoController {
    @Autowired
    private UserService userService;

    @ApiOperation("登录成功回显数据")
    @GetMapping("/getUserInfo")
    private Result<GetUserInfoVO> getUserInfo(){
        log.info("登录成功回显数据");
        GetUserInfoVO getUserInfoVO = userService.getUserInfo();
        return Result.success(getUserInfoVO);
    }
}
